package com.xh.bussiness.thirdapi.xuebang.constant;


/**
 * @author Pitt Cheung
 * @date 2021/7/8 14:00
 */
public enum XuebangClassStatusEnum {

    //1.未上课;2.上课中;3.未完成;4.已结课;5.无效
    PENDDING_START(1,"PENDDING_START"),
    STARTED(2,"STARTED"),
    UNFINISHED(3,"UNFINISHED"),
    CONPELETE(4,"CONPELETE"),
    INVALID(5,"INVALID");

    /**
     * 状态编码
     */
    private Integer status;

    /**
     * 状态值
     */
    private String statusCode;

    public static Integer getVal(String code) {
        for (XuebangClassStatusEnum value : XuebangClassStatusEnum.values()) {
            if (value.getStatusCode().equals(code)) {
                return value.getStatus();
            }
        }
        return null;
    }

    XuebangClassStatusEnum(Integer status, String statusCode) {
        this.status = status;
        this.statusCode = statusCode;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getStatusCode() {
        return statusCode;
    }

    public void setStatusCode(String statusCode) {
        this.statusCode = statusCode;
    }
}
